// create by 2021-11-03

// 查询敏感规则列表
import request from '@/utils/request'

/**
 * 获取敏感规则列表数据
 */
export function getRolesList(query) {
  return request({
    url: '/system/sensitiveRule/list',
    method: 'get',
    params: query
  })
}

/**
 * 获取敏感规则详情
 */
export function getRolesInfo(query) {
  return request({
    url: '/system/sensitiveRule/query',
    method: 'get',
    params: query
  })
}

/**
 * 更新敏感规则状态
 */
export function updateRolesStatus(data) {
  return request({
    url: '/system/sensitiveRule/updateStatus',
    method: 'post',
    data
  })
}

/**
 * 新增敏感规则
 */
export function addRoles(data) {
  return request({
    url: '/system/sensitiveRule/add',
    method: 'post',
    data
  })
}

/**
 * 修改敏感规则
 */
export function updateRoles(data) {
  return request({
    url: '/system/sensitiveRule/update',
    method: 'post',
    data
  })
}

/**
 * 新增敏感规则
 */
export function deleteRoles(data) {
  return request({
    url: '/system/sensitiveRule/delete',
    method: 'post',
    data
  })
}

/**
 * 敏感规则 匹配
 */
export function getMatchingRoles(data) {
  return request({
    url: '/system/sensitiveRule/getMatching',
    method: 'post',
    data
  })
}

/**
 * 敏感规则 替换
 */
export function getValidatingRoles(data) {
  return request({
    url: '/system/sensitiveRule/getReplaceValidating',
    method: 'post',
    data
  })
}

/**
 * 敏感规则 分组
 */
export function getGroupingRoles(data) {
  return request({
    url: '/system/sensitiveRule/getGrouping',
    method: 'post',
    data: data
  })
}

/**
 * 敏感规则 分组
 */
export function getDataSensitiveWords(data) {
  return request({
    url: '/system/sensitiveRule/getDataSensitiveWords',
    method: 'post',
    data: data
  })
}
